package com.guoyansoft.controller;

import com.guoyansoft.config.R;
import com.guoyansoft.model.service.StatisticalReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/statisticalReport")
public class StatisticalReportController {
    @Autowired
    private StatisticalReportService statisticalReportService;
    @RequestMapping("/queryByPage")
    public R queryByPage(String shopName,Integer curPage,Integer pageSize){
        Map<String,Object> params=new HashMap<>();
        params.put("shopNameKey","%"+shopName+"%");
        params.put("startIndexKey",(curPage-1)*pageSize);
        params.put("pageSizeKey",pageSize);
        R r = statisticalReportService.queryByPage(params);
        return r;
    }
}
